package com.shuwen.gcdj.mapper.mysql;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shuwen.gcdj.bean.power.request.GetAllPowerReq;
import com.shuwen.gcdj.bean.power.response.PowerItemResp;
import com.shuwen.gcdj.bean.power.response.PowerParentResp;
import com.shuwen.gcdj.bean.role.request.GetAllRoleReq;
import com.shuwen.gcdj.bean.rolepower.response.ButtonPowerResp;
import com.shuwen.gcdj.bean.rolepower.response.PowerLevelResp;
import com.shuwen.gcdj.entity.Power;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 权限(t_user_power)数据Mapper
 *
 * @author localhost_ubuntu
 * @since 2021-11-24 21:56:05
 * @description created by mybaits plus code generator
*/
@Mapper
public interface PowerMapper extends BaseMapper<Power> {
    /**
     * 获取所有权限码
     *
     * @return List<PowerItemResp>
     */
    IPage<PowerItemResp> getAllList(Page<PowerItemResp> page, @Param("bean") GetAllPowerReq bean);


    PowerItemResp getBypowerId(@Param("bean")GetAllRoleReq req, @Param("powerId") String powerId);

    List<PowerLevelResp> getListbyIdS(@Param("powerIdList")List<String> powerIdList);

    List<ButtonPowerResp> getButtonPowerList(@Param("parentId")String parentId);

    List<PowerParentResp> getAllParentList();

    /**
     * 获取全部菜单信息
     * @return
     */
    List<PowerParentResp> getAllPowerList();

}
